<?php

/**
 * Description of GroupMenuForm
\* www.teuker.nl - mail@teuker.nl
 * 
 * @author francisc
 */

class GroupMenuForm extends sfForm {

    public function configure() {
        $this->setWidgets(array(
            'name' => new sfWidgetFormInput(),
            'description' => new sfWidgetFormTextarea()
        ));

        $this->setValidators(array(
            'name' => new sfValidatorString(array('required' => true)),
            'description' => new sfValidatorString(array('max_length' => 5000, 'min_length' => 3, 'required' => false))
        ));

        $this->widgetSchema->setNameFormat('group_menu[%s]');
    }
}
